<script>

    function Promise(callback) {
        this.then = callback


        // console.log(this.then);

        /*  this.then((a)=>{
             console.log(a);
          },(b)=>{
             console.log(b);
          } ) */
    }


    let p = new Promise((resolve, reject) => {

        // console.log(resolve,reject);

        // resolve("aaaaaaaaaa") //resolve的参数就是then的第一个回到函数的参数

        reject("bbbbbbbb") // reject的参数就是then的第二个回到函数的参数


    })


    p.then((a) => {
        console.log(a);
    }, (b) => {
        console.log(b);
    })


</script>